import random
sign = ["+","-","*","/"]
cnt = 0
correct = 0
wrong = 0
print("Welcome to the Calcuate Game! Please answer the question following:")
print("If you want to quit, please input 'exit' ")
while True:
    flags = random.choice(sign)
    a = random.randint(1, 10)
    b = random.randint(1, 10)
    if a>=b and a%b==0 and flags == "/":
        cnt = cnt + 1
        ans = a/b
        print("Question",str(cnt) + ": " + str(a) + flags + str(b) + " =",end='')
    elif flags == "/":
        continue
    if flags == "+":
        cnt = cnt + 1
        ans = a+b
        print("Question",str(cnt) + ": " + str(a) + flags + str(b) + " =",end='')
    if a>=b and flags == "-":
        cnt = cnt + 1
        ans = a-b
        print("Question",str(cnt) + ": " + str(a) + flags + str(b) + " =",end='')
    elif flags == "-":
        continue
    if flags == "*":
        cnt = cnt + 1
        ans = a*b
        print("Question",str(cnt) + ": " + str(a) + flags + str(b) + " =",end='')
    inans = input()
    if inans == ' ':
        print("Wrong input")
        wrong = wrong + 1
        exit = int(input("Continue? 0/1"))
        continue
    if inans =='exit':
        cnt = cnt - 1
        break
    if int(inans) == ans:
        print("RIGHT")
        correct = correct + 1
        continue
    else:
        wrong = wrong + 1
        print("WRONG!")
        continue
if cnt !=0 and (correct != 0 or wrong != 0):
    print("FINISH!")
    print("You have done", str(cnt) + " questions")
    print("Correct:", str(correct) + ", " + "Wrong:" + str(wrong))
print("Thanks for playing!")
